<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Menú principal</title>
    </h:head>
        <h:form>  
    <p:growl id="messages" showDetail="false"/>
 
    <h3 style="margin-top:0">Plain Menu</h3>
    <p:menu>
        <p:submenu label="Ajax Menuitems">
            <p:menuitem value="Save" actionListener="#{menuView.save}" update="messages" icon="ui-icon-disk" />
            <p:menuitem value="Update" actionListener="#{menuView.update}" update="messages" icon="ui-icon-arrowrefresh-1-w"/>
        </p:submenu>
        <p:submenu label="Non-Ajax Menuitem">
            <p:menuitem value="Delete" actionListener="#{menuView.delete}" update="messages" ajax="false" icon="ui-icon-close"/>
        </p:submenu>
        <p:submenu label="Navigations">
            <p:menuitem value="External" url="http://www.primefaces.org" icon="ui-icon-home"/>
            <p:menuitem value="Internal" outcome="/mobile/index" icon="ui-icon-star"/>
        </p:submenu>
    </p:menu>
 
    <h3>Overlay</h3>
    <p:commandButton id="dynaButton" value="Show" type="button" icon="ui-icon-extlink"/>
    <p:menu overlay="true" trigger="dynaButton" my="left top" at="left bottom">
        <p:submenu label="Ajax Menuitems">
            <p:menuitem value="Save" actionListener="#{menuView.save}" update="messages" icon="ui-icon-disk"/>
            <p:menuitem value="Update" actionListener="#{menuView.update}" update="messages" icon="ui-icon-arrowrefresh-1-w"/>
        </p:submenu>
        <p:submenu label="Non-Ajax Menuitem">
            <p:menuitem value="Delete" actionListener="#{menuView.delete}" update="messages" ajax="false" icon="ui-icon-close"/>
        </p:submenu>
        <p:submenu label="Navigations">
            <p:menuitem value="External" url="http://www.primefaces.org" icon="ui-icon-home"/>
            <p:menuitem value="Internal" outcome="/mobile/index" icon="ui-icon-star"/>
        </p:submenu>
    </p:menu>
 
    <h3>Programmatic Menu</h3>
    <p:menu model="#{menuView.model}" />
</h:form>
    </h:body>
</html>

